package com.dyc.maitaole.service.impl;

import com.dyc.maitaole.dao.UserDAO;
import com.dyc.maitaole.entity.User;
import com.dyc.maitaole.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDAO userDAO;

    public User login(String userName, String userPassword) {
        User user = userDAO.login(userName, userPassword);
        return user;
    }

    public User register(String userName, String userPassword) {
        User user = userDAO.register(userName, userPassword);
        return user;
    }
}
